#include<reg51.h>
sbit clk=P1^0;
unsigned char num=0;
unsigned int cnt =(65536-50000);
void main()
{
	TMOD=0X51;
	TH0=cnt/256;
	TL0=cnt%256;
	ET0=1;
	EA=1;
	TR0=1;
	while(1);
}
void t_0()interrupt 1
{
	num++;
	if(num==20)
	{
	num=0;
	clk=~clk;
	}
	TH0=cnt/256;
	TL0=cnt%256;
}